/************************************************************
 * Copyright (C), 2022-2032, dina. Co., Ltd.
 * FileName:        i_log4qt.h
 * Author:          Dan Yin
 * Date:            2022-12-08
 * Description:     the class of log interface
 * Version:         1.0.0.0
 **********************************************************/

#ifndef I_LOG4QT_H
#define I_LOG4QT_H

#include <QObject>

#define ILog4Qt_iid "org.qt-project.Qt.Examples.ILog4Qt"

// define a pure virtual class
class ILog4Qt : public QObject
{
    Q_OBJECT
public:
    // Output data to the terminal
    virtual void outputLog(QtMsgType mgsType, const QString & msgText) = 0;

    // Output data to the terminal
    virtual void outputLog(QtMsgType mgsType, const QMessageLogContext & msgContext, const QString & msgText) = 0;
};

// declare interface
Q_DECLARE_INTERFACE(ILog4Qt, ILog4Qt_iid)

#endif // I_LOG4QT_H
